using System;
using System.Data;
using System.Data.OleDb;
using System.Collections;
using System.Text;


namespace hemsidan.DataAccess
{
	/// <summary>
	/// Summary description for DBAccess.
	/// </summary>
	public class DBAccess : DB
	{
		private OleDbConnection myConn;
		public DBAccess()
		{
			myConn = new OleDbConnection(Helpers.Settings.ConnStr);
		}


		public override DataSet ExecuteDataSet(string sql)
		{
			OleDbDataAdapter da = new OleDbDataAdapter(sql, myConn);
			myConn.Open();
			DataSet ds = new DataSet();
			da.Fill	(ds);
			myConn.Close();
			
			return ds;
		}

		public override void ExecuteNonQuery(string sql)
		{
			OleDbCommand cmd = new OleDbCommand(sql, myConn);
			myConn.Open();
			cmd.ExecuteNonQuery();
			myConn.Close();
		}
	
	}
}
